{{- define "image_pull_secret" }}
{{- printf "{\"auths\": {\"%s\": {\"username\": \"%s\",\"password\": \"%s\", \"auth\": \"%s\"}}}" .Values.image_registry.addr .Values.image_registry.user .Values.image_registry.passwd (printf "%s:%s" .Values.image_registry.user .Values.image_registry.passwd | b64enc) | b64enc }}
{{- end }}

{{- define "replicas.paas_kafka_operator" }}
{{- if eq .Values.replica_semantic "ha" -}}
{{- print .Values.ha_replicas.paas_kafka_operator }}
{{- else if eq .Values.replica_semantic "poc" -}}
{{- print .Values.poc_replicas.paas_kafka_operator }}
{{- end -}}
{{- end }}
